package com.xiayong.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DataReciverController {
    private static final Logger logger = LoggerFactory.getLogger(DataReciverController.class);

    @RequestMapping("/dataReciver")
    public void dataRecive(final HttpServletRequest request, final HttpServletResponse response) {
        String data = request.getParameter("rb_data");
        DataReciverController.logger.info("recive data from " + request.getRemoteHost() + ":" + request.getRemotePort()
                + "\n" + data);
    }
}
